

package com.hazelcast.internal.metrics.impl;

/**
 * DTO for data that can be reused for  next metrics collection.
 */
class MetricDescriptorReusableData {
    private final int allCreatedLastSize;
    private final int poolPtr;
    private MetricDescriptorImpl[] pool;

    MetricDescriptorReusableData(int allCreatedLastSize, MetricDescriptorImpl[] pool, int poolPtr) {
        this.allCreatedLastSize = allCreatedLastSize;
        this.pool = pool;
        this.poolPtr = poolPtr;
    }

    int getAllCreatedLastSize() {
        return allCreatedLastSize;
    }

    MetricDescriptorImpl[] getPool() {
        return pool;
    }

    int getPoolPtr() {
        return poolPtr;
    }

    void destroy() {
        pool = null;
    }
}
